<?php
$url = $mosConfig_live_site."/images/banners/";
$sql = "SELECT * FROM #__banner WHERE showBanner=1 AND location='left' ORDER BY date DESC";
$database->setQuery($sql);
$logoLeft = $database->loadObjectlist();
for ($i=0; $i<count($logoLeft); $i++){
?>
<div class="adv">
	<a href="<?php echo $logoLeft[$i]->clickurl;?>" target="_blank">
	<img src="<?php echo $url.$logoLeft[$i]->imageurl;?>" width="188" border="0" />
	</a>
</div>
<?php
}
?>